/**  
 * @Title: LoginUtil.java
 * @Description: TODO(描述)
 * @author liuyi
 * @date 2023-11-21 08:47:27 
 */  
package com.fsxgt.datagrid.sys.utils;

import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;

import com.fsxgt.datagrid.sys.bo.LoginBO;
import com.fsxgt.datagrid.sys.bo.SysUserBO;

/**  
 * @ClassName: LoginUtil
 * @Description: TODO(描述)
 * @author liuyi
 * @date 2023-11-21 08:47:27 
*/
public class LoginHelper {

	
	public static SysUserBO getCurUser() {
		Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
		LoginBO loginBO = (LoginBO) authentication.getPrincipal();

		return loginBO.getSysUserBO();
	}
}
